package mirrormonkey.rpc.tools.result.listeners;

import mirrormonkey.rpc.RpcListener;
import mirrormonkey.rpc.module.RegisteredCall;

import com.jme3.math.Vector3f;
import com.jme3.network.MessageConnection;
import com.jme3.scene.Geometry;

public class SetTranslationListener implements RpcListener {

	@Override
	public void resultArrived(RegisteredCall registeredCall,
			MessageConnection source, Object result) {
		((Geometry) registeredCall.entity)
				.setLocalTranslation((Vector3f) result);
	}

	@Override
	public void errorArrived(RegisteredCall registeredCall,
			MessageConnection source, String message) {
	}

	@Override
	public void timedOut(RegisteredCall registeredCall) {
	}

}
